537306f4084c404b7d017781a62f09e39b0c9e44,opennms-services/src/main/java/org/opennms/netmgt/config/GroupManager.java,GroupManager,isUserScheduledForRole,#String#String#Date#,507
Before Change
public boolean isUserScheduledForRole(String userId, String roleid, Date time) throws MarshalException, ValidationException, IOException {
update();
List scheds = getUserSchedulesForRole(userId, roleid);
for (Iterator it = scheds.iterator(); it.hasNext();) {
Schedule sched = (Schedule) it.next();
if (BasicScheduleUtils.isTimeInSchedule(time, sched)) {
return true;
}
}
// if no user is scheduled then the supervisor is schedule by default
Role role = getRole(roleid);
if (userId.equals(role.getSupervisor())) {
for (Iterator it = role.getScheduleCollection().iterator(); it.hasNext();) {
Schedule sched = (Schedule) it.next();
if (BasicScheduleUtils.isTimeInSchedule(time, sched)) {
// we found another scheduled user
return false;
After Change
public boolean isUserScheduledForRole(String userId, String roleId, Date time) throws MarshalException, ValidationException, IOException {
update();
for (Schedule sched : getUserSchedulesForRole(userId, roleId)) {
if (BasicScheduleUtils.isTimeInSchedule(time, sched)) {
return true;
}
}
// if no user is scheduled then the supervisor is schedule by default
Role role = getRole(roleId);
if (userId.equals(role.getSupervisor())) {
for (Schedule sched : role.getScheduleCollection()) {
if (BasicScheduleUtils.isTimeInSchedule(time, sched)) {
// we found another scheduled user
return false;